package alp.starcode.nudtportal.framework.mybatis.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * user_message（用户消息表）
 * </p>
 *
 * @author xwx
 * @since 2023-08-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("user_message")
@ApiModel(value = "UserMessage对象", description = "user_message（用户消息表）")
public class UserMessage extends Model<UserMessage> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "消息流水号")
    @TableId("message_id")
    private String messageId;

    @ApiModelProperty(value = "用户流水号")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "消息状态：0未读、1已读")
    @TableField("message_status")
    private Boolean messageStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Long createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private Long updateTime;


    @Override
    protected Serializable pkVal() {
        return this.messageId;
    }

}
